package service.impl;

import bean.dto.VisitorQueryPage;
import bean.pojo.Visitor;
import dao.VisitorDao;
import dao.impl.VisitorDaoImpl;
import service.VisitorService;

import java.util.Date;
import java.util.List;

/**
 * service.impl
 * User: 坚持
 * Date: 2024/12/18 11:55
 * motto: 树欲静而风不止
 * Description:
 * Version: V1.0
 */
public class VisitorServiceImpl implements VisitorService {
    VisitorDao visitorDao=new VisitorDaoImpl();
    @Override
    public Boolean add(Visitor visitor) {
        return visitorDao.add(visitor)>0;
    }

    @Override
    public Boolean deleteById(Integer visitorId) {
        return visitorDao.deleteById(visitorId)>0;
    }

    @Override
    public Boolean update(Visitor visitor) {
        return visitorDao.update(visitor)>0;
    }

    @Override
    public Long findByTotal(VisitorQueryPage visitorQueryPage) {
        return visitorDao.findByTotal(visitorQueryPage);
    }

    @Override
    public List<Visitor> visitorFindBy(VisitorQueryPage visitorQueryPage ) {
        return visitorDao.visitorFindBy(visitorQueryPage);
    }
}
